package edu.sjtu.erplab.cm.dao.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * ErrorCode entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "error_code")
public class ErrorCode implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	// Fields
	public static final String TABLE_ALIAS = "ErrorCode";
	public static final String ALIAS_ERROR_CODE = "errorCode";
	public static final String ALIAS_ERROR_MESSAGE = "errorMessage";

	private Integer errorId;
	private String errorCode;
	private String errorMessage;

	// Constructors

	/** default constructor */
	public ErrorCode() {
	}

	/** full constructor */
	public ErrorCode(String errorCode, String errorMessage) {
		this.errorCode = errorCode;
		this.errorMessage = errorMessage;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Integer getErrorId() {
		return errorId;
	}

	public void setErrorId(Integer errorId) {
		this.errorId = errorId;
	}

	@Column(name = "error_code", unique = true, nullable = false, length = 50)
	public String getErrorCode() {
		return this.errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	@Column(name = "error_message", nullable = false, length = 200)
	public String getErrorMessage() {
		return this.errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

}